package com.matrix.java.chap_03;

import java.util.Scanner;

/*
    几何：点是否在三角形内？
 */
public class Ex3_27 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("Enter a point ' s x- and y-coordinates: ");
        double x = input.nextDouble();
        double y = input.nextDouble();
        if (x<0||y>100||y<0||-0.5*x+100<y){
            System.out.println("The point is not in the triangle");
        }else {
            System.out.println("The point is in the triangle");
        }
        input.close();
    }
}
